lst = [2, 1, 4]

lst.sort()
print(lst)

lst.sort(reverse=True)
print(lst)

lst2 = ['banan', 'apple', 'Cat']
lst2.sort()
print(lst2)

lst2.sort(key=str.lower)
print(lst2)

print('-'*40, '内置sorted排序，产生新的数组')

lst3 = [20, 10, 40]
new_lst = sorted(lst3)
print(lst3)
print(new_lst)
print(sorted(lst3, reverse=True))

lst4 = ['banan', 'apple', 'Cat']
new_lst2 = sorted(lst4, key=str.lower)
print(lst4)
print(new_lst2)

